/**
  ******************************************************************************
             Copyright(c) 2023 China Core Co. Ltd.
                      All Rights Reserved
  ******************************************************************************
  * @file    type.h
  * @author  Product application department
  * @version V1.0
  * @date    202302.18
  * @brief   Header file of type.
  *
  ******************************************************************************
*/

#ifndef __TYPE_H__
#define __TYPE_H__

/*****************************************************************************/

#define  __I               volatile const       /*!< Defines 'read only' permissions                 */
#define  __O               volatile             /*!< Defines 'write only' permissions                */
#define  __IO              volatile             /*!< Defines 'read / write' permissions              */

#define TRUE               1
#define FALSE              0
#ifndef NULL
#define NULL               ((void *)0)    /*!< Defines 'NULL' permissions */
#endif

/*****************************************************************************/
typedef unsigned char      boolean;
typedef signed char        int8_t;
typedef signed short       int16_t;
typedef signed int         int32_t;

typedef unsigned char      uint8_t;
typedef unsigned short     uint16_t;
typedef unsigned int       uint32_t;

typedef float              float32_t;

typedef int32_t  s32;
typedef unsigned short     u16;
/*****************************************************************************/
typedef union
{
	uint16_t size;
	uint8_t  size_byte[2];
}uint16_8_union_t;

typedef union
{ 
	uint32_t size;
	uint16_t size_short[2];
	uint8_t  size_byte[4];
}uint32_8_union_t;

/*****************************************************************************/
typedef enum
{
    BIT_RESET = 0,
    BIT_SET   = 1
}BitActionTypeDef;

typedef enum
{
	DISABLE = 0,
	ENABLE  = 1
} FunctionalStateTypeDef;

typedef enum
{
	RESET = 0,
	SET   = 1
}FlagStatusTypeDef;

typedef enum
{
	GPIO_LOW = 0,
	GPIO_HIGH   = 1
}GPIO_PinStateTypeDef;

/*****************************************************************************/
//#define GPIO_PinStateTypeDef FlagStatusTypeDef
#define FunctionalState   FunctionalStateTypeDef

#endif /* __TYPE_H__ */

